<?
require_once 'config.php';
$total = $templateProduct->products_total();
$url = $_SERVER['REQUEST_URI'];
if(preg_match('/\?page=/',$url)){
   $current_page =(int) preg_replace('/^.+page=/','',$url);
}
if(!is_int($current_page)) $current_page = 1;
if(gettype($current_page) != "integer") $current_page = 1;
if($current_page <0 || !$current_page) $current_page = 1;
$templateProduct->page_size = 14;
$templateProduct->page = $current_page;
$products = $templateProduct->products();
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="vi" lang="vi" xmlns:og="http://ogp.me/ns#" xmlns:fb="">
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <link type="image/x-icon" href="/favicon.ico" rel="icon" />
   
   <title>Sản phẩm</title>
   <meta name="description" content=""/>
   <meta name="keywords" content=""/>
   <meta name="AUTHOR" content="Vnupdate" />
   <meta name="COPYRIGHT" content="" />
   <meta name="ROBOTS" content="INDEX, FOLLOW" />
   <meta name="RATING" content="GENERAL" />
   
   <meta property="og:title" content="" />
   <meta property="og:type" content="website" />
   <meta property="og:url" content="" />
   <meta property="og:image" content="" />
   <meta property="og:site_name" content="" />
   <meta property="og:description" content="" />
   <meta property="fb:admins" content="" />
   <meta property="fb:app_id" content=""/> 
   <!-- css -->   
   <link rel="stylesheet" type="text/css" href="<?=TEMPLATE_PATH?>css/home.css" />	
   <link type="text/css" rel="stylesheet" href="<?=TEMPLATE_PATH?>css/jquery-ui.min.css" media="screen" />
   <!-- js -->
   <script type="text/javascript" src="<?=TEMPLATE_PATH?>js/jquery-1.9.0.min.js"></script>
   <script type="text/javascript" src="<?=TEMPLATE_PATH?>js/common.js"></script>
   <script type="text/javascript" src="<?=TEMPLATE_PATH?>js/jquery-ui.min.js" charset="UTF-8"></script>
</head>
<body>   
   <? include('view/common/vic_header.php');?>
   <div class="global_container">
      <div class="slider">
         <?include('view/common/vic_slide.php')?>
      </div>
      <div class="content_wrap">
         <div class="content_left">
            <?include('view/common/vic_content_left.php')?>
            
         </div>
         <div class="content_right">
            <div class="products_hot_wrap">
               <h1 class="pro_hot_title">
                  SẢN PHẨM
               </h1>
               <?include('view/product/vip_products.php')?>
            </div>
         </div>
      </div>
      <?include('view/common/vic_social_networking.php');?>
   </div>
   <?include('view/common/vic_footer.php');?>
</body>
</html>